namespace Tequila.Phone.Sharing.Facebook
{
    /// <summary>
    /// Facebook authorization session.
    /// </summary>
    public sealed class FacebookAuthorizationSession
    {
        /// <summary/>
        public string AppId { get; set; }

        /// <summary/>
        public string AppSecret { get; set; }

        /// <summary>
        /// Determines whether session is in valid state or not.
        /// </summary>
        public bool IsValid
        {
            get
            {
                return !string.IsNullOrEmpty(AppId)
                       && !string.IsNullOrEmpty(AppSecret);
            }
        }

        /// <summary>
        /// Closes session by means of cleaning session internal state.
        /// </summary>
        public void Close()
        {
            AppId = null;
            AppSecret = null;
        }
    }
}